﻿/*****************************************************************//**
 * @file    FITKViewAdaptorMeshInstance.h
 * @brief   Adaptor for part data.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-03-25
 *********************************************************************/

#ifndef __FITKVIEWADAPTORMESHINSTANCE_H__
#define __FITKVIEWADAPTORMESHINSTANCE_H__

#include "FITKVTKViewAdaptorBase.h"

#include "FITKVTKGraphAdaptorAPI.h"

namespace Exchange
{
    /**
     * @brief   Graph object data adaptor for 'assembly instance'.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-03-25
     */
    class FITKVTKGRAPHADAPTORAPI FITKViewAdaptorMeshInstance : public FITKVTKViewAdaptorBase
    {
        // Regist
        FITKCLASS(Exchange, FITKViewAdaptorMeshInstance);

    public:
        /**
         * @brief   Constructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-25
         */
        explicit FITKViewAdaptorMeshInstance() = default;

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-25
         */
        ~FITKViewAdaptorMeshInstance() = default;

        /**
         * @brief   Execute the data exchange.[override]
         * @return  Is OK
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-25
         */
        bool update() override;

    };

    // Regist mesh instance adaptor M4
    Register2FITKViewAdaptorFactory(MeshInstance, Interface::FITKAssemblyInstanceM4, FITKViewAdaptorMeshInstance, 1);

    // Regist mesh instance adaptor TR
    Register2FITKViewAdaptorFactory(MeshInstance, Interface::FITKAssemblyInstanceTR, FITKViewAdaptorMeshInstance, 2);

    // Regist mesh instance adaptor
    Register2FITKViewAdaptorFactory(MeshInstance, Interface::FITKAssemblyInstance, FITKViewAdaptorMeshInstance, 3);
}   // namespace Exchange

#endif // __FITKVIEWADAPTORMESHINSTANCE_H__
